<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/elec/elecGun.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>设备管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>编辑枪信息</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">编辑枪信息</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="frmElecGun">
                        <input id="elecGunId" name="elecGunId" type="hidden" value="${elecGun.elecGunId}">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="gunNo" name="gunNo"
                                       value="${elecGun.gunNo}" readonly>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪顺序号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="gunNum" name="gunNum"
                                       value="${elecGun.gunNum}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">服务状态</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="status" id="status">
                                    <option value="">--请选择--</option>
                                    <option value="0"
                                            <c:if test="${elecGun.status eq '0'}">selected</c:if>   >空闲
                                    </option>
                                    <option value="1"
                                            <c:if test="${elecGun.status eq '1'}">selected</c:if>   >使用中
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecGun.status eq '2'}">selected</c:if>  >插枪中
                                    </option>
                                    <option value="3"
                                            <c:if test="${elecGun.status eq '3'}">selected</c:if>  >已充满
                                    </option>
                                    <option value="4"
                                            <c:if test="${elecGun.status eq '4'}">selected</c:if>  >离线
                                    </option>
                                    <option value="5"
                                            <c:if test="${elecGun.status eq '5'}">selected</c:if>  >充电中
                                    </option>
                                    <option value="6"
                                            <c:if test="${elecGun.status eq '6'}">selected</c:if>  >已结束
                                    </option>
                                    <option value="7"
                                            <c:if test="${elecGun.status eq '7'}">selected</c:if>  >故障
                                    </option>
                                </select>
                            </div>
                        </div>
                       <%-- <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪型号：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="gunType" id="gunType">
                                    <option value="">--请选择--</option>
                                    <option value="1"
                                            <c:if test="${elecGun.gunType eq '1'}">selected</c:if>   >家用插座（模式2)
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecGun.gunType eq '2'}">selected</c:if>  >交流接口插座（模式3, 连接方式B)
                                    </option>
                                    <option value="3"
                                            <c:if test="${elecGun.gunType eq '3'}">selected</c:if>  >交流接口插头（带枪线，模式3,
                                        连接方式C)
                                    </option>
                                    <option value="4"
                                            <c:if test="${elecGun.gunType eq '4'}">selected</c:if>  >直流接口枪头（带枪线，模式4)
                                    </option>
                                    <option value="5"
                                            <c:if test="${elecGun.gunType eq '5'}">selected</c:if> >无线充电座
                                    </option>
                                    <option value="6"
                                            <c:if test="${elecGun.gunType eq '6'}">selected</c:if> >其他
                                    </option>
                                </select>
                            </div>
                        </div>--%>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">枪型号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="nationalStandard" name="nationalStandard"
                                       value="${elecGun.nationalStandard}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">输出电压范围</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="voltageLowerLimits" name="voltageLowerLimits"
                                       value="${elecGun.voltageLowerLimits}">
                            </div>
                            <span>~</span>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="voltageUpperLimits" name="voltageUpperLimits"
                                       value="${elecGun.voltageUpperLimits}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">输出最大电流</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="current" name="current"
                                       value="${elecGun.current}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">生产厂商</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="hlhtManufacturerName" name="hlhtManufacturerName"
                                       value="${elecGun.hlhtManufacturerName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">出厂编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="hlhtManufacturerId" name="hlhtManufacturerId"
                                       value="${elecGun.hlhtManufacturerId}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属充电桩</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="elecPileId" id="elecPileId">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${piles}" var="pileInfo">
                                        <option value="${pileInfo.elecPileId}"
                                                <c:if test="${pileInfo.elecPileId eq pileInfo.elecPileId}">selected</c:if>
                                        >${pileInfo.pileSort}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-success">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    addElecGun.init();
</script>
</body>
</html>
